package edu.ccut.saturn.studio.naviagtor.actions;

import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;

import edu.ccut.saturn.studio.Activator;
import edu.ccut.saturn.studio.Images;
import edu.ccut.saturn.studio.core.util.action.SaturnAction;
import edu.ccut.saturn.studio.core.util.eclipse.Messages;
import edu.ccut.saturn.studio.validate.wizard.ValidateWizard;

public class NewSaturnValidateAction extends  SaturnAction {

	public NewSaturnValidateAction() {

		setText(Messages.getString("NewSaturnValidateAction.validate")); //$NON-NLS-1$

		setImageDescriptor(Activator.getImageDescriptor(Images.NEWSATURN_VALIDATE_ACTION));
	}

	public void run() {
		ValidateWizard validateFileWizard = new ValidateWizard();
		validateFileWizard.init(PlatformUI.getWorkbench(), super.getStructuredSelection());
		WizardDialog wizarddialog = new WizardDialog(PlatformUI.getWorkbench()
				.getActiveWorkbenchWindow().getShell(), validateFileWizard);
		wizarddialog.open();
	}
}
